/*
day359 
2020.8.21 
*/
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;


class Solution {
public:
    vector<int> findSwapValues(vector<int>& array1, vector<int>& array2) {
		sort(array1.begin(),array1.end());
		sort(array2.begin(),array2.end());
		
		int sum1=0,sum2=0;
		for(int i=0;i<array1.size();++i)
		{
			sum1+=array1[i];
		}
		for(int i=0;i<array2.size();++i)
		{
			sum2+=array2[i];
		}
		
		int x=sum1-sum2;
		if(x%2!=0)
		{
			return {};
		 } 
		
		int p1=0,p2=0;
		while(p1<array1.size() && p2<array2.size())
		{
			int tem=2*(array1[p1]-array2[p2]);
			if(tem==x)
			{
				return {array1[p1],array2[p2]};
			}
			if(tem<x)
			{
				p1++;
			}
			else
			{
				p2++;
			}
		}
		
		return {};
    }
};

int main()
{
	return 0;
}
